import { DefaultApi } from 'bjtu-portrait-api'

import request from '@/utils/request'

const BASE_URL = 'http://8.130.78.125:8080'
// const BASE_URL = 'https://mock.apifox.cn/m1/2469897-0-default'
const api = new DefaultApi(null, BASE_URL, request)

export function searchStudent(keyword) {
    return api.getStuId(keyword)
}

export function getStudents(keyword) {
    return api.getStudents(keyword.page, keyword.size, keyword.name, keyword.stuId, keyword.major, keyword.class)
}

export function getHeadInfo(id) {
    return api.getHeadInfo(id)
}

export default api
